from flask import request, jsonify
from flask import Flask

app = Flask(__name__)

@app.route('/scan', methods=['POST'])
def scan_file():
    file = request.files['file']
    features = feature_extractor.process(file)
    result = detector.predict(features)
    return jsonify({
        'result': result,
        'confidence': 0.98,
        'features_used': list(features.keys())
    }) 